<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
  <head>
    <title>打印送票单</title>
    <!--media=print 这个属性可以在打印时有效-->
    <style media=print>
      .Noprint {
        display: none;
        font-size: 19px;
      }
    </style>
    <style>
      .tdp {
        font-size: 12pt;
      }
      td {
        padding:0px;
        border:1px solid #000000
      }
    </style>
  </head>
  <body>
    <span class="Noprint">
      <center>
        <OBJECT id=WebBrowser classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 width=0>
        </OBJECT>
        <input type=button value=打印 onclick=document.all.WebBrowser.ExecWB(6,1)><input type=button value=直接打印 onclick=document.all.WebBrowser.ExecWB(6,6)><input type=button value=页面设置 onclick=document.all.WebBrowser.ExecWB(8,1)><input type=button value=打印预览 onclick=document.all.WebBrowser.ExecWB(7,1)>
      </center>
    </span>
    <br>
    <div align="center">国家一级航空客运资质单位&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font size=5><%=Constants::COMPANY_NAME%>国际航空送票单</font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;24小时订票热线:<%=Constants::COMPANY_PHONE%></div>
    <br>
    <div align="center">受理单号：<%=@order.order_no%>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;请您确认所有航班信息以免耽误行程，谢谢！&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<%=Constants::COMPANY_NAME%>旅行网：【<%=Constants::COMPANY_WEBSITE%>】</div>
    <table width="900" align="center" cellpadding="2" cellspacing="0" class="tdp" style="border-collapse:collapse">
      <tr>
        <td width="100">
          票号
        </td>
        <td width="180">
          旅客姓名
        </td>
        <td width="45">
          PNR
        </td>
        <td width="55">
          航程
        </td>
        <td width="55">
          航班号
        </td>
        <td width="35">
          舱位
        </td>
        <td width="65">
          乘机日期
        </td>
        <td width="65">
          起飞时间
        </td>
        <td width="35">
          票价
        </td>
        <td width="30">
          税
        </td>
        <td width="30">
          F
        </td>
        <td width="35">
          保险
        </td>
        <td width="30">
          BF
        </td>
        <td width="35">
          其他
        </td>
        <td width="35">
          合计
        </td>
      </tr>
      <% total_price = 0
      sum = @tickets.length
      for i in 0..4
        if i<sum
          ticket = @tickets[i]
          passenger = ticket.passenger
          if passenger
            total_price += ticket.total_price %>
            <tr>
              <td>
                <%=ticket.ticket_no %>&nbsp;
              </td>
              <td>
                <%=passenger.name %>&nbsp;
                <%=passenger.card %>
              </td>
              <td>
                <%=ticket.pnr %>&nbsp;
              </td>
              <td>
                <%=ticket.fromto %>&nbsp;
              </td>
              <td>
                <%=ticket.air_no %>&nbsp;
              </td>
              <td>
                <%=ticket.position %>&nbsp;
              </td>
              <td>
                <%=ticket.fly_date %>&nbsp;
              </td>
              <td>
                <%=ticket.fly_time %>&nbsp;
              </td>
              <td>
                <%=ticket.price %>&nbsp;
              </td>
              <td>
                <%=ticket.airdrome_tax+ticket.fuel_tax %>&nbsp;
              </td>
              <td>
                <%=ticket.price_F %>&nbsp;
              </td>
              <td>
                <%=20*ticket.insurance_number %>&nbsp;
              </td>
              <td>
                <%=ticket.insurance_F %>&nbsp;
              </td>
              <td>
                <%=ticket.other %>&nbsp;
              </td>
              <td>
                <%=ticket.total_price %>&nbsp;
              </td>
            </tr>
          <% end
        else %>
          <tr>
            <td>
              &nbsp;
            </td>
            <td>
              &nbsp;
            </td>
            <td>
              &nbsp;
            </td>
            <td>
              &nbsp;
            </td>
            <td>
              &nbsp;
            </td>
            <td>
              &nbsp;
            </td>
            <td>
              &nbsp;
            </td>
            <td>
              &nbsp;
            </td>
            <td>
              &nbsp;
            </td>
            <td>
              &nbsp;
            </td>
            <td>
              &nbsp;
            </td>
            <td>
              &nbsp;
            </td>
            <td>
              &nbsp;
            </td>
            <td>
              &nbsp;
            </td>
            <td>
              &nbsp;
            </td>
          </tr>
        <%
        end
      end %>
    </table>
    <table width="900" align="center" cellpadding="2" cellspacing="0" class="tdp" style="border-collapse:collapse">
      <tr>
        <td width="70">
          客户名称
        </td>
        <td width="150">
          <%=@order.customer.name %>&nbsp;
        </td>
        <td width="65">
          送票时间
        </td>
        <td width="155">
          <%=@order.send_date %>&nbsp;<%=@order.send_time %>&nbsp;<%=@order.send_request %>
        </td>
        <td width="60">
          要求
        </td>
        <td width="160">
          <%=@order.order_request %>&nbsp;
        </td>
        <td width="60" rowspan=2>
          总金额
        </td>
        <td width="180" rowspan=2 align="center">
          <strong>
            <font size="6">
              <%=total_price %>
            </font>
          </strong>
        </td>
      </tr>
      <tr>
        <td>
          卡号
        </td>
        <td>
          <%=@order.customer.customer_no %>&nbsp;
        </td>
        <td>
          联系电话
        </td>
        <td colspan=3>
          <%=@order.link_tel %>&nbsp;(<%=@order.link_man %>)
        </td>
      </tr>
      <tr>
        <td>
          地址
        </td>
        <td colspan=5>
          <%=@order.send_address %>&nbsp;
        </td>
        <td rowspan=3 colspan=2>
          客户签字
        </td>
      </tr>
      <tr>
        <td>
          订票员
        </td>
        <td>
          <%=@order.creator.user_name %>&nbsp;
        </td>
        <td>
          出票员
        </td>
        <td>
          <%=@order.ticket_outer.user_name %>&nbsp;
        </td>
        <td>
          送票员
        </td>
        <td>
          <%=@order.sender.user_name %>&nbsp;
        </td>
      </tr>
      <tr>
        <td colspan=2>
          <%=@created_at %>&nbsp;
        </td>
        <td colspan=2>
          <%=@ticket_out_date %>&nbsp;
        </td>
        <td colspan=2>
          &nbsp;
        </td>
      </tr>
    </table>
  </body>
</html>
